#

Tuesday, July 28, 2020

C Program to Covert Celcius into Fahrenheit

This Program converts the input Celcius temperature to Fahrenheit temperature.

Example to Convert Celcius into Fahrenheit


In this program we gonna take two Variables - Celcius and Fahrenheit. At very first, we use scanf () function and ask the user to input the value of Celcius.

After that, We use the conversion formula of Celsius to Fahrenheit for conversion. and, at last, we print the value of Fahrenheit.


# include<stdio.h>

void main()
{
          float  celcius, Fahrenheit;
            
           printf("Enter the Temperature in Celcius --> ");
           scanf("%f", &celcius);


            Fahrenheit = 1.8 * celcius + 32;

            printf(" Celcius [%.2f]  = Fahrenheit [%.2f] ", celcius, Fahrenheit );

}




No comments:

Post a Comment

Popular Feed

Recent Story

Featured News

Back To Top